package com.hdaccp.letting.service.impl;
import com.alibaba.dubbo.config.annotation.Service;
import com.hdaccp.letting.entity.User;
import com.hdaccp.letting.service.UserService;
import com.hdaccp.letting.service.until.UserUtil;

import java.util.List;

@Service
public class UserServiceImpl1 implements UserService {
    @Override
    public User getUser(int id) {
        List<User> list = UserUtil.getUsers() ;
        User user = null ;
        for(User u : list){
            if(u.getId() == id){
                user = u ;
                break ;
            }
        }
        System.out.println("v2.0");
        return user ;
    }
}
